package com.luobo.home.utils;

import java.util.List;

public class ListToStringUtils {

    public static String ListToString(List<String> list) {

        if ( list == null ) {
            return null;
        }

        StringBuilder sb = new StringBuilder();
        for (String s : list) {
            if (sb.length() > 0) {
                sb.append(","); // 如果不是第一个元素，则添加分隔符
            }
            sb.append(s);
        }

        String result = sb.toString();

        return result;
    }

}
